package com.base.dataStructure.Tree;

/**
 * @Author: hdhao
 * @Create: 2023/4/5 - 16:07
 * @Version: v1.0
 */
//树的节点类
public class TreeNode {
    public int val;
    public TreeNode left;
    public TreeNode right;

    public TreeNode(int val) {
        this.val = val;
    }

    public TreeNode(int val, TreeNode left, TreeNode right) {
        this.val = val;
        this.left = left;
        this.right = right;
    }

    @Override
    public String toString() {
        return String.valueOf(this.val);
    }
}
